import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import SlideVerify from 'vue-monoplasty-slide-verify';

Vue.use(SlideVerify);

// 引入节流
import preventReClick from './plugin/preventReClick'
Vue.use(preventReClick)

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import "@/style/gloal.css"

import Avue from '@smallwei/avue';
import '@smallwei/avue/lib/index.css';
Vue.use(Avue);

Vue.use(ElementUI);

Vue.config.productionTip = false

import axios from "axios"

// 导入 NProgress 包对应的JS和CSS
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'


// axios.defaults.baseURL = "http://8.130.175.209:3000"
axios.defaults.baseURL = "http://127.0.0.1:3000"

// 请求拦截
axios.interceptors.request.use(config => {
  NProgress.start()
  config.headers.Authorization = window.sessionStorage.getItem('token')
  return config
})
// 响应拦截
axios.interceptors.response.use(config => {
  NProgress.done()
  return config
})

Vue.prototype.axios = axios

 

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
